<?php echo $html->css('/news/css/page/other');?>
<?php 
$hot_news = ClassRegistry::init('news.News')->find('all', array(
	'conditions'	=> array(
        'is_published'   => 1
	),
	'fields'	=> array('News.image', 'News.alias', 'News.title', 'News.news_date', 'News.description', 'NewsCategory.alias'),
	'contain'	=> array(),
	'limit'		=> 3,
	'order'		=> 'News.news_date desc, News.created desc',
	'joins' => array(
		array(
			'table' => 'news_middle',
			'type' => 'INNER',
			'alias' => 'ReferenceCategory',
			'conditions' => array(
				"News.id = ReferenceCategory.page_id"
			)
		),
		array(
			'table' => 'news_categories',
			'type' => 'INNER',
			'alias' => 'NewsCategory',
			'conditions' => array(
				"NewsCategory.id = ReferenceCategory.category_id"
			)
		)
	),
	
));
?>
<h4 class="articles"><?php  __('Tin Mới Nhất');?></h4>
<div class="wd-feature">
	<ul class="wd-list-category">
		<?php foreach ($hot_news as $item):?>
			<li>
                <a href="<?php echo $html->url(array('plugin' => 'news', 'controller' => 'news', 'action' => 'view', $item['News']['alias'], $item['NewsCategory']['alias']));?>"><img class="wd-img-news" src="<?php if($item['News']['image']) echo $html->url('/').'files/news/'.$html->getThumbnailName($item['News']['image']); else echo $html->url('/files/news/no-picture.jpg');?>" alt=""/></a>
                <div class="wd-sub-title"><h3 class="wd-st1"><a href="<?php echo $html->url(array('plugin' => 'news', 'controller' => 'news', 'action' => 'view', $item['News']['alias'], $item['NewsCategory']['alias']));?>"><?php echo $this->text->new_truncate($item['News']['title'], 35)?><span>(<?php echo date("d/m/Y", strtotime($item['News']['news_date']));?>)</span></a></h3></div>
                <p><?php echo $this->text->new_truncate(strip_tags($item['News']['description']), 100); ?></p>
            </li>
		<?php endforeach;?>
    </ul>
</div>